	If NoTablesXs() = "There is no table exist." Then
			SetClipBoard("There is no table exist.")
				
		ElseIf DVDCollectionTableName() = "DVD-Collection table is missing." Then
			SetClipBoard("DVD-Collection table is not exist.")















	If NoTablesXs() = "There is no table exist." Then
			SetClipBoard("There is no table exist.")
				
		ElseIf DVDCollectionTableName() = "DVD-Collection table is missing." Then
			SetClipBoard("DVD-Collection table is not exist.")
			
		ElseIf DVDCollectionCount() = "There some fields are incorrect." Then
			SetClipBoard("There some fields are incorrect.")
	
		Else	
			SetClipBoard("Incorrect in creating Tables and Fields of DVD-Collection.")





and _
		(oDVD.getByIndex(1).Name = "Actor") and (oDVD.getByIndex(1).TypeName = "VARCHAR") and  (oDVD.getByIndex(1).Precision = 100) and _
		(oDVD.getByIndex(2).Name = "Genre") and   (oDVD.getByIndex(2).Precision = 20) and _
		(oDVD.getByIndex(3).Name = "Director") and  and  (oDVD.getByIndex(3).Precision = 100) and _
		(oDVD.getByIndex(4).Name = "MovieTitle") and  and  (oDVD.getByIndex(4).Precision = 100) and _
		(oDVD.getByIndex(5).Name = "Rating") and  and  (oDVD.getByIndex(5).Precision = 5) and _
		(oDVD.getByIndex(6).Name = "Subjects")  and  (oDVD.getByIndex(6).Precision = 50) and _
		(oDVD.getByIndex(7).Name = "ReleaseYear")  and  (oDVD.getByIndex(7).Precision = 4)



 and _
		(oDVD.getByIndex(2).Name = "Genre") and (oDVD.getByIndex(2).TypeName = "VARCHAR") and  _
		(oDVD.getByIndex(3).Name = "Director") and (oDVD.getByIndex(3).TypeName = "VARCHAR") and   _
		(oDVD.getByIndex(4).Name = "MovieTitle") and (oDVD.getByIndex(4).TypeName = "VARCHAR") and  (oDVD.getByIndex(4).Precision = 100) and _
		(oDVD.getByIndex(5).Name = "Rating") and (oDVD.getByIndex(5).TypeName = "VARCHAR") and  (oDVD.getByIndex(5).Precision = 5) and _
		(oDVD.getByIndex(6).Name = "Subjects") and (oDVD.getByIndex(6).TypeName = "VARCHAR") and  (oDVD.getByIndex(6).Precision = 50) and _
		(oDVD.getByIndex(7).Name = "ReleaseYear") and (oDVD.getByIndex(7).TypeName = "NUMERIC") and 

			



		and  (oDVD.getByIndex(1).Precision = 100) and (oDVD.getByIndex(2).Precision = 20) and (oDVD.getByIndex(3).Precision = 100) and _
		(oDVD.getByIndex(4).Precision = 100) and (oDVD.getByIndex(5).Precision = 5) and (oDVD.getByIndex(6).Precision = 50) and _
		 (oDVD.getByIndex(7).Precision = 4) Then
		










	If NoTablesXs() = "There is no table exist." Then
			SetClipBoard("There is no table exist.")
			
		ElseIf DVDCollectionTableName() = "DVD-Collection table is missing." Then
			SetClipBoard("DVD-Collection table is not exist.")
	
		ElseIf DVDCollectionCount() = "There some fields are incorrect." Then
			SetClipBoard("There some fields are incorrect.")
			




Function NoTablesXs()
On Error Resume Next
Dim Visual as Object

	DVDTable= ThisComponent.ScriptContainer.DataSource
	oDVDTable = DVDTable.getConnection(user, password)
	ooDVDTable = oDVDTable.getTables()  
	Tables = ooDVDTable.Count() 
		
		If Tables < 1 Then
			NoTablesXs = "There is no table exist."
		Else
			NoTablesXs = "CORRECT"
		EndIf 
End Function

Function DVDCollectionCount()
 On Error Resume Next 
		
	DVDCollect = ThisComponent.ScriptContainer.DataSource
	oDVDCollect = DVDCollect.getConnection(user, password)
	ooDVDCollect = oDVDCollect.getTables() 
	oDVD = ooDVDCollect.getByName("DVD-Collection")
	ooDVD = oDVD.getColumns().getCount()
	
	If ooDVD = 8 Then
		DVDCollectionCount = "CORRECT"		
	Else
		 DVDCollectionCount = "There some fields are incorrect."
	EndIf		 			
End Function

Function DVDCollectionTableName()
On Error Resume Next
	DVDCollect = ThisComponent.ScriptContainer.DataSource
	oDVDCollect = DVDCollect.getConnection(user, password)
	ooDVDCollect = oDVDCollect.getTables()  
	oDVD = ooDVDCollect.getByIndex(0)
	GetTableName = oDVD.Name
	
	 If GetTableName = "DVD-Collection" Then
			DVDCollectionTableName = "CORRECT"
	Else
	 		DVDCollectionTableName = "DVD-Collection table is missing."
	 EndIf
End Function







 and (oDVD.getByIndex(2).Name = "Genre") and (oDVD.getByIndex(3).Name = "Director") and _
	   (oDVD.getByIndex(4).Name = "MovieTitle") and (oDVD.getByIndex(5).Name = "Rating") and (oDVD.getByIndex(6).Name = "Subject") and _
	   (oDVD.getByIndex(7).Name = "ReleaseYear") and (oDVD.getByIndex(0).Name = "ID")








